3.6 \(\int \frac{(a+b x) \sin (c+d x)}{x^2} \, dx\)

Optimal. Leaf size=48 \[ a d \cos (c) \text{CosIntegral}(d x)-a d \sin (c) \text{Si}(d x)-\frac{a \sin (c+d x)}{x}+b \sin (c) \text{CosIntegral}(d x)+b \cos (c) \text{Si}(d x) \]

[Out]

a*d*Cos[c]*CosIntegral[d*x] + b*CosIntegral[d*x]*Sin[c] - (a*Sin[c + d*x])/x + b*Cos[c]*SinIntegral[d*x] - a*d
*Sin[c]*SinIntegral[d*x]

________________________________________________________________________________________

Rubi [A]  time = 0.220958, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {6742, 3297, 3303, 3299, 3302} \[ a d \cos (c) \text{CosIntegral}(d x)-a d \sin (c) \text{Si}(d x)-\frac{a \sin (c+d x)}{x}+b \sin (c) \text{CosIntegral}(d x)+b \cos (c) \text{Si}(d x) \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x)*Sin[c + d*x])/x^2,x]

[Out]

a*d*Cos[c]*CosIntegral[d*x] + b*CosIntegral[d*x]*Sin[c] - (a*Sin[c + d*x])/x + b*Cos[c]*SinIntegral[d*x] - a*d
*Sin[c]*SinIntegral[d*x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{(a+b x) \sin (c+d x)}{x^2} \, dx &=\int \left (\frac{a \sin (c+d x)}{x^2}+\frac{b \sin (c+d x)}{x}\right ) \, dx\\ &=a \int \frac{\sin (c+d x)}{x^2} \, dx+b \int \frac{\sin (c+d x)}{x} \, dx\\ &=-\frac{a \sin (c+d x)}{x}+(a d) \int \frac{\cos (c+d x)}{x} \, dx+(b \cos (c)) \int \frac{\sin (d x)}{x} \, dx+(b \sin (c)) \int \frac{\cos (d x)}{x} \, dx\\ &=b \text{Ci}(d x) \sin (c)-\frac{a \sin (c+d x)}{x}+b \cos (c) \text{Si}(d x)+(a d \cos (c)) \int \frac{\cos (d x)}{x} \, dx-(a d \sin (c)) \int \frac{\sin (d x)}{x} \, dx\\ &=a d \cos (c) \text{Ci}(d x)+b \text{Ci}(d x) \sin (c)-\frac{a \sin (c+d x)}{x}+b \cos (c) \text{Si}(d x)-a d \sin (c) \text{Si}(d x)\\ \end{align*}

Mathematica [A]  time = 0.149822, size = 60, normalized size = 1.25 \[ a d (\cos (c) \text{CosIntegral}(d x)-\sin (c) \text{Si}(d x))-\frac{a \sin (c) \cos (d x)}{x}-\frac{a \cos (c) \sin (d x)}{x}+b \sin (c) \text{CosIntegral}(d x)+b \cos (c) \text{Si}(d x) \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)*Sin[c + d*x])/x^2,x]

[Out]

-((a*Cos[d*x]*Sin[c])/x) + b*CosIntegral[d*x]*Sin[c] - (a*Cos[c]*Sin[d*x])/x + b*Cos[c]*SinIntegral[d*x] + a*d
*(Cos[c]*CosIntegral[d*x] - Sin[c]*SinIntegral[d*x])

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 56, normalized size = 1.2 \begin{align*} d \left ({\frac{b \left ({\it Si} \left ( dx \right ) \cos \left ( c \right ) +{\it Ci} \left ( dx \right ) \sin \left ( c \right ) \right ) }{d}}+a \left ( -{\frac{\sin \left ( dx+c \right ) }{dx}}-{\it Si} \left ( dx \right ) \sin \left ( c \right ) +{\it Ci} \left ( dx \right ) \cos \left ( c \right ) \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)*sin(d*x+c)/x^2,x)

[Out]

d*(b/d*(Si(d*x)*cos(c)+Ci(d*x)*sin(c))+a*(-sin(d*x+c)/x/d-Si(d*x)*sin(c)+Ci(d*x)*cos(c)))

________________________________________________________________________________________

Maxima [C]  time = 1.81677, size = 146, normalized size = 3.04 \begin{align*} \frac{{\left ({\left (a{\left (\Gamma \left (-1, i \, d x\right ) + \Gamma \left (-1, -i \, d x\right )\right )} \cos \left (c\right ) - a{\left (i \, \Gamma \left (-1, i \, d x\right ) - i \, \Gamma \left (-1, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{2} -{\left (b{\left (-i \, \Gamma \left (-1, i \, d x\right ) + i \, \Gamma \left (-1, -i \, d x\right )\right )} \cos \left (c\right ) - b{\left (\Gamma \left (-1, i \, d x\right ) + \Gamma \left (-1, -i \, d x\right )\right )} \sin \left (c\right )\right )} d\right )} x - 2 \, b \cos \left (d x + c\right )}{2 \, d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c)/x^2,x, algorithm="maxima")

[Out]

1/2*(((a*(gamma(-1, I*d*x) + gamma(-1, -I*d*x))*cos(c) - a*(I*gamma(-1, I*d*x) - I*gamma(-1, -I*d*x))*sin(c))*
d^2 - (b*(-I*gamma(-1, I*d*x) + I*gamma(-1, -I*d*x))*cos(c) - b*(gamma(-1, I*d*x) + gamma(-1, -I*d*x))*sin(c))
*d)*x - 2*b*cos(d*x + c))/(d*x)

________________________________________________________________________________________

Fricas [A]  time = 1.72236, size = 270, normalized size = 5.62 \begin{align*} \frac{{\left (a d x \operatorname{Ci}\left (d x\right ) + a d x \operatorname{Ci}\left (-d x\right ) + 2 \, b x \operatorname{Si}\left (d x\right )\right )} \cos \left (c\right ) - 2 \, a \sin \left (d x + c\right ) -{\left (2 \, a d x \operatorname{Si}\left (d x\right ) - b x \operatorname{Ci}\left (d x\right ) - b x \operatorname{Ci}\left (-d x\right )\right )} \sin \left (c\right )}{2 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c)/x^2,x, algorithm="fricas")

[Out]

1/2*((a*d*x*cos_integral(d*x) + a*d*x*cos_integral(-d*x) + 2*b*x*sin_integral(d*x))*cos(c) - 2*a*sin(d*x + c)
- (2*a*d*x*sin_integral(d*x) - b*x*cos_integral(d*x) - b*x*cos_integral(-d*x))*sin(c))/x

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b x\right ) \sin{\left (c + d x \right )}}{x^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c)/x**2,x)

[Out]

Integral((a + b*x)*sin(c + d*x)/x**2, x)

________________________________________________________________________________________

Giac [C]  time = 1.11929, size = 768, normalized size = 16. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c)/x^2,x, algorithm="giac")

[Out]

-1/2*(a*d*x*real_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + a*d*x*real_part(cos_integral(-d*x))*tan
(1/2*d*x)^2*tan(1/2*c)^2 + 2*a*d*x*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2*a*d*x*imag_part(
cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) + 4*a*d*x*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c) + b*x*imag
_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - b*x*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/
2*c)^2 + 2*b*x*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c)^2 - a*d*x*real_part(cos_integral(d*x))*tan(1/2*d*x)
^2 - a*d*x*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2 - 2*b*x*real_part(cos_integral(d*x))*tan(1/2*d*x)^2*ta
n(1/2*c) - 2*b*x*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) + a*d*x*real_part(cos_integral(d*x))*
tan(1/2*c)^2 + a*d*x*real_part(cos_integral(-d*x))*tan(1/2*c)^2 - b*x*imag_part(cos_integral(d*x))*tan(1/2*d*x
)^2 + b*x*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2 - 2*b*x*sin_integral(d*x)*tan(1/2*d*x)^2 + 2*a*d*x*imag
_part(cos_integral(d*x))*tan(1/2*c) - 2*a*d*x*imag_part(cos_integral(-d*x))*tan(1/2*c) + 4*a*d*x*sin_integral(
d*x)*tan(1/2*c) + b*x*imag_part(cos_integral(d*x))*tan(1/2*c)^2 - b*x*imag_part(cos_integral(-d*x))*tan(1/2*c)
^2 + 2*b*x*sin_integral(d*x)*tan(1/2*c)^2 - a*d*x*real_part(cos_integral(d*x)) - a*d*x*real_part(cos_integral(
-d*x)) - 2*b*x*real_part(cos_integral(d*x))*tan(1/2*c) - 2*b*x*real_part(cos_integral(-d*x))*tan(1/2*c) - 4*a*
tan(1/2*d*x)^2*tan(1/2*c) - 4*a*tan(1/2*d*x)*tan(1/2*c)^2 - b*x*imag_part(cos_integral(d*x)) + b*x*imag_part(c
os_integral(-d*x)) - 2*b*x*sin_integral(d*x) + 4*a*tan(1/2*d*x) + 4*a*tan(1/2*c))/(x*tan(1/2*d*x)^2*tan(1/2*c)
^2 + x*tan(1/2*d*x)^2 + x*tan(1/2*c)^2 + x)